// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

/**
 * Enum for road types.
 */
enum class FWorldRoadObjectParkingSpaceAccess
{
	All,
	Car,
	Women,
	Handicapped,
	Bus,
	Truck,
	Electric,
	Residents
};

inline FWorldRoadObjectParkingSpaceAccess FWorldRoadObjectParkingSpaceAccessFromJson(const json& j)
{
	if (j == "all")			return FWorldRoadObjectParkingSpaceAccess::All;
	if (j == "car")			return FWorldRoadObjectParkingSpaceAccess::Car;
	if (j == "women")		return FWorldRoadObjectParkingSpaceAccess::Women;
	if (j == "handicapped")	return FWorldRoadObjectParkingSpaceAccess::Handicapped;
	if (j == "bus")			return FWorldRoadObjectParkingSpaceAccess::Bus;
	if (j == "truck")		return FWorldRoadObjectParkingSpaceAccess::Truck;
	if (j == "electric")	return FWorldRoadObjectParkingSpaceAccess::Electric;
	if (j == "residents")	return FWorldRoadObjectParkingSpaceAccess::Residents;
	return FWorldRoadObjectParkingSpaceAccess::All;
}

inline json FWorldRoadObjectParkingSpaceAccessToJson(FWorldRoadObjectParkingSpaceAccess p)
{
	if (p == FWorldRoadObjectParkingSpaceAccess::All)			return "all";
	if (p == FWorldRoadObjectParkingSpaceAccess::Car)			return "car";
	if (p == FWorldRoadObjectParkingSpaceAccess::Women)			return "women";
	if (p == FWorldRoadObjectParkingSpaceAccess::Handicapped)	return "handicapped";
	if (p == FWorldRoadObjectParkingSpaceAccess::Bus)			return "bus";
	if (p == FWorldRoadObjectParkingSpaceAccess::Truck)			return "truck";
	if (p == FWorldRoadObjectParkingSpaceAccess::Electric)		return "electric";
	if (p == FWorldRoadObjectParkingSpaceAccess::Residents)		return "residents";
	return "all";
}

inline void from_json(const json& j, FWorldRoadObjectParkingSpaceAccess& p)
{
	p = FWorldRoadObjectParkingSpaceAccessFromJson(j);
}

inline void to_json(json& j, const FWorldRoadObjectParkingSpaceAccess& p)
{
	j = FWorldRoadObjectParkingSpaceAccessToJson(p);
}
